@section('meta')
    <style>
        body{background-color: #fff;}
        .modal-content{display: unset;}
        .layui-form-label {width: 100px;}
        .layui-input-block {margin-left: 138px;}
        .layui-input, .layui-textarea {width: 86%;}
        .layui-form-select .layui-edge {right: 16%;}
        .layui-form-select dl {min-width: 86%;}
        .new-table {margin: 20px 0;}
    </style>
@endsection
@include('Home.User.Common._meta')
<!----  新增： 兼职者  ---->
<div class="modal-content new-table" id="addNew-content2">
    <form class="layui-form modal-client-info" action="" id="form-user" lay-filter="form-user">
        <div class="modal-func-btns">
            <a href="javascript:;" class="modal-save-btn" onclick="subForm('{{route('position_add')}}')" title="保存"><i class="icon icon-save"></i></a>
            <a href="javascript:location.replace(location.href);" class="modal-edit-btn" title="重置"><i class="icon icon-edit"></i></a>
        </div>
        @include('Home.User.Common._msg')
        <div class="layui-form-item">
            <label class="layui-form-label">招聘时间</label>
            <div class="layui-input-block">
                <input type="text" name="time" lay-verify="" placeholder="请输入招聘时间" autocomplete="off" value="{{date('Y-m-d H:i:s',time())}}" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>紧急程度</label>
            <div class="layui-input-block">
                <select name="emergency" lay-search>
                    <option value="">未选择</option>
                    <option value="1">紧急重要，优质客户</option>
                    <option value="2">紧急不重要，一般客户</option>
                    <option value="3">不紧急不重要，新客户</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>所属客户</label>
            <div class="layui-input-block">
                <select name="client_id" lay-search>
                    <option value="">未选择</option>
                    @foreach($client as $item)
                        <option value="{{$item->id}}">{{$item->chinese_name}}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>需求状态</label>
            <div class="layui-input-block">
                <select id="state" name="state">
                    <option value="0">closed</option>
                    <option value="1" selected>招聘中</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>职位名称</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" placeholder="请输入职位" value="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>工作地点</label>
            <div class="layui-input-block">
                <select id="region" name="region" lay-search>
                    <option value="0" disabled selected>请选择</option>
                    @foreach($country as $k => $v)
                        <option value="{{$k}}">{{$v['name']}}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>薪资范围</label>
            <div class="layui-input-block">
                <select id="range" name="range">
                    <option value="0" disabled selected>请选择</option>
                    @foreach($working_salary as $k => $v)
                        <option value="{{$k}}">{{$v['name']}}</option>
                    @endforeach
                </select>
            </div>
        </div>
        {{--
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>职位类别</label>
            <div class="layui-input-block">
                <select id="category" name="category" lay-search>
                    <option value="0" disabled selected>请选择</option>
                    @foreach($position_class as $parent1)
                        <optgroup label="{{$parent1->name}}">
                            @foreach($parent1->member as $parent2)
                                <optgroup label="└― {{$parent2->name}}">
                                    @foreach($parent2->member as $class)
                                        <option value="{{$class->id}}">&emsp;└―└― {{$class->name}}</option>
                                    @endforeach
                                </optgroup>
                            @endforeach
                        </optgroup>
                    @endforeach
                </select>
            </div>
        </div>
        --}}
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>HC</label>
            <div class="layui-input-block">
                <input type="text" name="hc" lay-verify="required" placeholder="请输入" value="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">职位要求</label>
            <div class="layui-input-block">
                <textarea name="demand" placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">悬赏金</label>
            <div class="layui-input-block">
                <input type="text" name="reward" lay-verify="required" placeholder="请输入悬赏金" value="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">指定任务归属于</label>
            <div class="layui-input-block">
                <label for="shareTo">
                    <input type="radio" lay-filter="shareTo" id="shareTo1" name="shareTo" value="1" title="私有" checked>
                </label>
                <label for="shareTo">
                    <input type="radio" lay-filter="shareTo" id="shareTo2" name="shareTo" value="2"  title="共享全员">
                </label>
                <label for="shareTo" class="no-margin">
                    <input type="radio" lay-filter="shareTo" id="shareTo3" name="shareTo" title="指派给" value="3">
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width: 160px;">
                            <select lay-filter="assign" id="assign" name="assign">
                                <option value="0" disabled selected>请选择</option>
                                @foreach($frame as $item)
                                    @foreach($item as $leader)
                                        <optgroup label="{{$leader->user->username}}">
                                            <option value="{{$leader->uid}}">{{$leader->user->username}}</option>
                                            @foreach($leader->member as $v)
                                                <option value="{{$v->uid}}">{{$v->user->username}}</option>
                                            @endforeach
                                        </optgroup>
                                    @endforeach
                                @endforeach
                            </select>
                        </div>
                    </div>
                </label>
            </div>
        </div>
    </form>
</div>
@section('footer')
    @include('Home.User.Common._assign')
@endsection
@include('Home.User.Common._footer')
@include('Home.User.Common._form')